<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <title>意达设计</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css"/>
    <link rel="stylesheet" type="text/css" href="../css/dealer.css"/>
    <style type="text/css">
    	html,body{ width: 100%; height: 100%;}
    </style>
</head>
<body class="body bodyBG">
    
<!-- header -->
<div class="detban">
	<img class="daimg" src="../image/dealer/img-002.jpg">
	<div class="detailheader">
		<a href="javascript:;" onclick="api.closeWin();" class="retue"></a>
		<a href="javascript:void(0);" class="sharelink" onclick="userset()"></a>
	</div>
	<div class="muzil">
		<div class="muzilimg">
            <img id='icon' src="">
            <input type="hidden" id='iconid' name='icon'>
        </div>
		<div class="nuget">
			<p id='name'>没头没脑没烦恼ぃ</p>
			<!-- <span id='phone'>15113542518</span> -->
		</div>
	</div>
</div>

<!-- contact -->
<div class="datit"><a href="#">我的订单</a></div>
<div class="datlist">
	<a href="javascript:void(0)">
		<p><img src="../image/icon/icon-039.png"></p>
		<span onclick="addorder()">新增订单</span>
	</a>
	<a href="javascript:void(0)"  onclick="myorder(2)">
		<p><img src="../image/icon/icon-040.png"><em id='rednum'>1</em></p>
		<span>待发货</span>
	</a>
	<a href="javascript:void(0)"  onclick="myorder(3)">
		<p><img src="../image/icon/icon-041.png"></p>
		<span>已发货</span>
	</a>
	<a href="javascript:void(0)"  onclick="myorder(4)">
		<p><img src="../image/icon/icon-042.png"></p>
		<span>确认收货</span>
	</a>
</div>

<div class="hr hrBG1"></div>

<div class="adelina">
	<a href="javascript:void(0)"  onclick="myaddr()">
		<p><img src="../image/icon/icon-043.png"></p>
		<span>收货地址管理</span>
	</a>
	<a href="javascript:void(0)" onclick="mysaler()">
		<p><img src="../image/icon/icon-044.png"></p>
		<span id="jxsuser">我的业务员</span>
	</a>
	<a href="javascript:void(0)" onclick="advice()">
		<p><img src="../image/icon/icon-045.png"></p>
		<span>意见反馈</span>
	</a>
</div>

<div class="nullbox"></div>
<div class="scafoter">
	<a href="javascript:void(0);" onclick="index()"><span></span>首页</a>
	<a href="javascript:void(0);" onclick="myorder(1)"><span></span>订单</a>
	<a href="javascript:void(0);" onclick="caiwu()"><span></span>财务</a>
	<a href="javascript:void(0);" class="scftOn" onclick=""><span></span>我的</a>
</div>


</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="../script/adaptive.js"></script>
<script type="text/javascript" src="../script/tabs.js"></script>
<script type="text/javascript">
    window['adaptive'].desinWidth = 750;
    window['adaptive'].baseFont = 28;
    window['adaptive'].maxWidth = 750;
    window['adaptive'].init();


    
    function addorder() {
        api.openWin({
            name: 'dealer5Name',
            url: './slide.html',
            pageParam: {
                
            }
        });
    }
    function userset() {
        api.openWin({
            name: 'dealer5Name',
            url: './userset.html',
            reload: true,
            pageParam: {
                
            }
        });
    }
    function myorder(type) {
    	api.openWin({
            name: 'dealer5Name',
            url: './myorder.html',
            pageParam: {
                type: type
            }
        });
    } 
   

    apiready = function () {

        $api.fixStatusBar($api.dom('.header'));
        api.addEventListener({
            name: 'keyback'
        }, function(ret, err){
            api.closeWidget();
        });
		api.showProgress();

        if(isvip==2){
            $('#jxsuser').html("我的经销商");
        }else{
            $('#jxsuser').html("我的业务员");
        }

		var para=api.pageParam;
        //alert(para.text);

		var p={token:token};
        api.ajax({
            url: webSiteUrl+'/app/user/user',
            method: 'post',
            data: {
                values:p
            }
        }, function(ret, err) {
            api.hideProgress();
            
			if(ret.code==200){
            	
                $('#icon').attr("src",webSiteUrl+ret.data.icon);
                $('#name').html(ret.data.nickname);
                //$('#phone').html(ret.data.phone);
                
                $('#rednum').html(ret.data.rednum);

           
            }else{alert(ret.msg)}
        });


       
    }
    function myaddr() {
        api.openWin({
            name: 'dealer12Name',
            url: './myaddr.html',
            reload: true,
            pageParam: {
                
            }
        });
    }
    function mysaler() {

        if(isvip==2){
            api.openWin({
                name: 'dealer11Name',
                url: './myuser.html',
                pageParam: {
                    
                }
            });
        }else{
            api.openWin({
                name: 'dealer11Name',
                url: './mysaler.html',
                pageParam: {
                    
                }
            });
        }
        
    }
    function index() {
        api.openWin({
            name: 'slideName',
            url: './slide.html',
            pageParam: {
                
            }
        });
    }
    function order() {
        api.openWin({
            name: 'dealer11Name',
            url: './myorder.html',
            reload: true,
            pageParam: {
                type:1,
            }
        });
    }
    function caiwu() {
        api.openWin({
            name: 'dealer11Name',
            url: './caiwu.html',
            reload: true,
            pageParam: {
                
            }
        });
    }
    function advice() {
        api.openWin({
            name: 'dealer10Name',
            url: './advice.html',
            pageParam: {
                
            }
        });
    }

</script>

</html>